# Author: Yubin Lim(purewell@gmail.com)
# Date: 2008-01-18
# License: BSD License
# Copyright: All rights reserved by Yubin Lim.

# Required CMake Version
cmake_minimum_required(VERSION 2.6)

# Project is libpurewell
project(libpurewell)

# Project Version
set(PROJECT_MAJOR_VERSION "0")
set(PROJECT_MINOR_VERSION "1")
set(PROJECT_PATCH_VERSION "1")
set(PROJECT_RELEASE_VERSION "1")
set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}-${PROJECT_RELEASE_VERSION}")

# Verbose mode
set(CMAKE_VERBOSE_MAKEFILE 0)

# Required libraries
set(CMAKE_REQUIRED_LIBRARIES "-lpthread -lrt -lc -ldl")

# Output path
set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib")
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin")

set(BUILD_SHARED_LIBS ON)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")

# Library Directory Name
if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" )
	set(LIBDIRNAME "lib64")
else ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" )
	set(LIBDIRNAME "lib")
endif ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" )

# Install Position
if ( ${UNIX} )
	set( CMAKE_INSTALL_PREFIX "/usr/" )
endif ( ${UNIX} )

# Sub-directories
add_subdirectory(doc)
add_subdirectory(include)
add_subdirectory(libsrc)
add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(pack)

